package sentinel.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProviderColony8902Controller {

    @Value("${server.port}")
    private String port;

    @GetMapping("/c1")
    public String c1(){
        if(System.currentTimeMillis() %2 == 0) {
            return "provider-colony-" + this.port + "-c1";
        }else{
            return (1/0) + "";
        }
    }
}
